package lbh.crawler;

import java.util.ArrayList;
import java.util.List;

public class Frontier extends Module {

	private List<CrawlingWebsite> crawlingWebsites = new ArrayList<>();

	public Frontier(Subsystem ss, String name) {
		super(ss, name);
	}

	public void addCrawlingWebsite(CrawlingWebsite cw) {

		synchronized (crawlingWebsites) {
			crawlingWebsites.add(cw);
		}
	}

	public void removeCrawlingWebsite(CrawlingWebsite cw) {
		
		synchronized (crawlingWebsites) {
			crawlingWebsites.remove(cw);
		}
	}

	public List<CrawlingWebsite> getCrawlingWebsites() {
		
		return this.crawlingWebsites ;
	}

}
